package com.zsc.wxapp.services;

import com.zsc.wxapp.entity.Announcement;
import com.zsc.wxapp.entity.dto.AdminAnnouncementDTO;
import com.zsc.wxapp.entity.dto.AnnouncementDTO;
import com.zsc.wxapp.entity.vo.AdminAnnouncementVO;
import com.zsc.wxapp.entity.vo.AnnouncementListVO;
import com.zsc.wxapp.entity.vo.AnnouncementVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface AnnouncementService {

    /**
     * 根据key获取该分类的所有公告
     * @param key 分类key
     * @return List
     */
    List<AnnouncementListVO> getByKey(Integer key);

    /**
     * 根据卷烟ID获取公告
     * @param cigaretteId 卷烟ID
     * @return AnnouncementVO
     */
    List<AnnouncementVO> getByCigaretteId(String productCode);

    /**
     * 获取公告详情
     * @param id 公告id
     * @return AnnouncementVO
     */
    AnnouncementVO getById(Integer id);

    /**
     * 添加公告

     * @param announcementDTO
     * @return
     */
    String add(AnnouncementDTO announcementDTO) throws IOException;

    String delete(List<Integer> ids);

    List<AnnouncementListVO> get();

    AdminAnnouncementVO getListById(Integer id);

    String update(AdminAnnouncementDTO announcementDTO) throws IOException;
}
